/**
 * 
 */
package com.lu.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lu.service.impl.WebSocketService;

/**
 * @author lusm
 *
 * @Date 2016年5月8日
 */
@Controller
@RequestMapping("/websocket")
public class WebSocketController {
	@Resource
	private WebSocketService webSocketService;

	@RequestMapping("/index.html")
	public String goToPage() {
		return "websocket";
	}

	@RequestMapping("/send")
	@ResponseBody
	private void sendMessage() {
		webSocketService.sendMessage("发给自己的信息");
	}

}
